<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2014 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: Tuolaji <479923197@qq.com>
// +----------------------------------------------------------------------
namespace Publish\Controller;

use Common\Controller\HomebaseController;
class AppendixController extends HomebaseController
{

	protected $appendix_model;

	function _initialize()
	{
		parent::_initialize();
		$this->appendix_model = D("PubAppendix");
        $this->terms_model = D("Publish/SystemTerms");
		
	}

	// 附录列表
	public function index()
	{
		$title = $this->appendix_model->field('id,title')->order('id asc')->select();
		$where['parent']=array('EQ','0');
        // $where['term_id']=array('NEQ','72');
        $where['term_id']=array(array('NEQ','72'),array('NEQ','75'));
        $term_list=$this->terms_model
            ->field('name,term_id')
            ->where($where)
            ->order("listorder desc,term_id asc")
            ->select();
        // dump($term_list);
        $this->assign("terms",$term_list);
		// dump($title);die;
		$this->assign('title',$title);
		$this->display("appendix_m");
	}

}